<?
$r = "../";
require_once($r."_engine/header_nocache.php");
require_once($r."_engine/functions.php");
require_once($r."_engine/c_account.php");

if (@$todo == "update")
{
	// Convert form data to DB representation

	// List of fields to be update in the database
	get_form_values($values, array(
		"email", "email_bcc",
	));

	$a = new CAccount();

	$a->id = $id;
	$a->Update($values);
}
else if (@$todo == "remove")
{
	$g_st_account->Delete(@$f_ids);
}
else 
{
	var_dump($todo);
	die("Incorrect data - todo.");
}

generate_html_redirect("accounts.php");
?>